import request from '@/utils/request'
export default {
    //生成订单
    createOrder(courseId) {
        return request({
            url: `/orderservice/order/create/${courseId}`,
            method: 'post',
        })
    },
    //获取订单
    getOrderInfo(orderNoId) {
        return request({
            url: `/orderservice/order/get/${orderNoId}`,
            method: 'get',
        })
    },
    //3、生成微信支付二维码
    createNative(orderNo) {
        return request({
            url: `/orderservice/paylog/createNative/${orderNo}`,
            method: 'get'
        })
    },
    //4、根据id获取订单支付状态
    queryPayStatus(orderNo) {
        return request({
            url: `/orderservice/paylog/queryPayStatus/${orderNo}`,
            method: 'get'
        })
    },
    //得到用户是否已经购买某课程
    getOrderStatus(courseId){
        return request({
            url:`/orderservice/order/getOrderStatus/${courseId}`,
            method:'get'
        })
    }
}